package com.foreverwin.mes.meapi.model;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 
 * </p>
 *
 * @author syngna
 * @since 2019-01-10
 */
@TableName("Z_NEXT_NUMBER")
public class NextNumber extends Model<NextNumber> {

    private static final long serialVersionUID = 1L;

   @TableId(value = "HANDLE", type = IdType.INPUT)
   private String handle;
   /**
    *更新时间戳
    */
   @TableField("CHANGE_STAMP")
   private String changeStamp;

   /**
    * 站点
    */
   @TableField("SITE")
   private String site;
   /**
    *下一编号类别，用于区分不同编号规则
    */
   @TableField("NEXT_NUMBER_TYPE")
   private String nextNumberType;
   /**
    * 前缀
    */
   @TableField("PREFIX")
   private String prefix;
   /**
    * 后缀
    */
   @TableField("SUFFIX")
   private String suffix;
   /**
    * 序列号进制数
    */
   @TableField("SEQUENCE_BASE")
   private String sequenceBase;
   /**
    * 最大序列号
    */
   @TableField("MAX_SEQUENCE")
   private String maxSequence;
   /**
    * 序列号长度
    */
   @TableField("SEQUENCE_LENGTH")
   private String sequenceLength;
   /**
    * 当前序列号，根据当前编号以此生成
    */
   @TableField("CURRENT_SEQUENCE")
   private String currentSequence;
   /**
    *暂未使用
    */
   @TableField("NEXT_NUMBER_FORMAT")
   private String nextNumberFormat;
   /**
    * 最小序列号，重置序列号时的初始序号
    */
   @TableField("MIN_SEQUENCE")
   private String minSequence;
   /**
    * 序号增长步长
    */
   @TableField("INCR")
   private String incr;
   /**
    * 报警阈值
    */
   @TableField("WARNING_THRESHOLD")
   private String warningThreshold;
   /**
    * 重置规则
    *      * N: 从不
    *      * A: 总是
    *      * D: 每天
    *      * W: 每周
    *      * M: 每月
    *      * Y: 每年
    *      * E: 每周 - 星期日
    *      * F: 每周 - 星期一
    *      * G: 每周 - 星期二
    *      * H: 每周 - 星期三
    *      * I: 每周 - 星期四
    *      * J; 每周 - 星期五
    *      * K: 每周 - 星期六
    */
   @TableField("RESET")
   private String reset;
   /**
    * 自定义编号绑定的作业
    */
   @TableField("ACTIVITY")
   private String activity;
   /**
    * 是否立即提交，暂未使用
    */
   @TableField("COMMIT_IMMEDIATELY")
   private String commitImmediately;
   /**
    * 编号规则创建时间
    */
   @TableField("CREATED_DATE_TIME")
   /**
    * 编号规则更新时间
    */
   private Date createdDateTime;
   @TableField("MODIFIED_DATE_TIME")
   private Date modifiedDateTime;


   public String getHandle() {
      return handle;
   }

   public void setHandle(String handle) {
      this.handle = handle;
   }

   public String getChangeStamp() {
      return changeStamp;
   }

   public void setChangeStamp(String changeStamp) {
      this.changeStamp = changeStamp;
   }

   public String getSite() {
      return site;
   }

   public void setSite(String site) {
      this.site = site;
   }

   public String getNextNumberType() {
      return nextNumberType;
   }

   public void setNextNumberType(String nextNumberType) {
      this.nextNumberType = nextNumberType;
   }

   public String getPrefix() {
      return prefix;
   }

   public void setPrefix(String prefix) {
      this.prefix = prefix;
   }

   public String getSuffix() {
      return suffix;
   }

   public void setSuffix(String suffix) {
      this.suffix = suffix;
   }

   public String getSequenceBase() {
      return sequenceBase;
   }

   public void setSequenceBase(String sequenceBase) {
      this.sequenceBase = sequenceBase;
   }

   public String getMaxSequence() {
      return maxSequence;
   }

   public void setMaxSequence(String maxSequence) {
      this.maxSequence = maxSequence;
   }

   public String getSequenceLength() {
      return sequenceLength;
   }

   public void setSequenceLength(String sequenceLength) {
      this.sequenceLength = sequenceLength;
   }

   public String getCurrentSequence() {
      return currentSequence;
   }

   public void setCurrentSequence(String currentSequence) {
      this.currentSequence = currentSequence;
   }

   public String getNextNumberFormat() {
      return nextNumberFormat;
   }

   public void setNextNumberFormat(String nextNumberFormat) {
      this.nextNumberFormat = nextNumberFormat;
   }

   public String getMinSequence() {
      return minSequence;
   }

   public void setMinSequence(String minSequence) {
      this.minSequence = minSequence;
   }

   public String getIncr() {
      return incr;
   }

   public void setIncr(String incr) {
      this.incr = incr;
   }

   public String getWarningThreshold() {
      return warningThreshold;
   }

   public void setWarningThreshold(String warningThreshold) {
      this.warningThreshold = warningThreshold;
   }

   public String getReset() {
      return reset;
   }

   public void setReset(String reset) {
      this.reset = reset;
   }

   public String getActivity() {
      return activity;
   }

   public void setActivity(String activity) {
      this.activity = activity;
   }

   public String getCommitImmediately() {
      return commitImmediately;
   }

   public void setCommitImmediately(String commitImmediately) {
      this.commitImmediately = commitImmediately;
   }

   public Date getCreatedDateTime() {
      return createdDateTime;
   }

   public void setCreatedDateTime(Date createdDateTime) {
      this.createdDateTime = createdDateTime;
   }

   public Date getModifiedDateTime() {
      return modifiedDateTime;
   }

   public void setModifiedDateTime(Date modifiedDateTime) {
      this.modifiedDateTime = modifiedDateTime;
   }

   public static final String HANDLE = "HANDLE";

   public static final String CHANGE_STAMP = "CHANGE_STAMP";

   public static final String SITE = "SITE";

   public static final String NEXT_NUMBER_TYPE = "NEXT_NUMBER_TYPE";

   public static final String PREFIX = "PREFIX";

   public static final String SUFFIX = "SUFFIX";

   public static final String SEQUENCE_BASE = "SEQUENCE_BASE";

   public static final String MAX_SEQUENCE = "MAX_SEQUENCE";

   public static final String SEQUENCE_LENGTH = "SEQUENCE_LENGTH";

   public static final String CURRENT_SEQUENCE = "CURRENT_SEQUENCE";

   public static final String NEXT_NUMBER_FORMAT = "NEXT_NUMBER_FORMAT";

   public static final String MIN_SEQUENCE = "MIN_SEQUENCE";

   public static final String INCR = "INCR";

   public static final String WARNING_THRESHOLD = "WARNING_THRESHOLD";

   public static final String RESET = "RESET";

   public static final String ACTIVITY = "ACTIVITY";

   public static final String COMMIT_IMMEDIATELY = "COMMIT_IMMEDIATELY";

   public static final String CREATED_DATE_TIME = "CREATED_DATE_TIME";

   public static final String MODIFIED_DATE_TIME = "MODIFIED_DATE_TIME";

   @Override
   protected Serializable pkVal() {
      return this.handle;
   }

   @Override
   public String toString() {
      return "NextNumber{" +
         "handle = " + handle +
         ", changeStamp = " + changeStamp +
         ", site = " + site +
         ", nextNumberType = " + nextNumberType +
         ", prefix = " + prefix +
         ", suffix = " + suffix +
         ", sequenceBase = " + sequenceBase +
         ", maxSequence = " + maxSequence +
         ", sequenceLength = " + sequenceLength +
         ", currentSequence = " + currentSequence +
         ", nextNumberFormat = " + nextNumberFormat +
         ", minSequence = " + minSequence +
         ", incr = " + incr +
         ", warningThreshold = " + warningThreshold +
         ", reset = " + reset +
         ", activity = " + activity +
         ", commitImmediately = " + commitImmediately +
         ", createdDateTime = " + createdDateTime +
         ", modifiedDateTime = " + modifiedDateTime +
         "}";
   }
}